import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/todo",
    //路由的重定向
  },
  {
    path: "/todo",
    name: "Home",
    component: () => import("../views/Todolist.vue"),
  },
  {
    path: "/cho",
    name: "cho",
    component: () => import("../views/chooseAll.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
